<template>
    <wl-panel title="部门详情" subTitle="" titleIcon="btn_xq">
        <template v-if="footerFlag" slot="panel_footer">
            <el-button @click="editOrg" type="primary">保存</el-button>
        </template>
        <template slot="panel_body">
          <el-form :model="formData" status-icon ref="orgForm" label-width="100px" class="demo-ruleForm">
            <wl-form-inner subTitle="基本信息">
                <template slot="inner_body">
                      <div class="wl-row">
                        <wl-form-item label="部门编号" prop="id" :itemData="formData">
                            <wl-input :disabled="true"  slot="input" slot-scope="col" class="wl-input-item" :rawData="col.columnData" field="id" placeholder="部门编号"></wl-input>
                        </wl-form-item>
                        <wl-form-item label="部门名称" prop="name" :itemData="formData">
                            <wl-input  slot="input" slot-scope="col" class="wl-input-item" :rawData="col.columnData" field="name" placeholder="输入部门名称"></wl-input>
                        </wl-form-item>
                    </div>
                    <div class="wl-row">
                        <wl-form-item label="负责人"  :importance="false"  prop="leader_list"   :itemData="formData">
                            <wl-arr-select reqUrl="/account/list.do" setW="460" slot="input" slot-scope="col" type="leader_list"  :rawData="col.columnData"></wl-arr-select>
                        </wl-form-item>
                    </div>
                    <div class="wl-row">
                        <wl-form-item class="wl-form-item-full-row" label="备注" :importance="false"  prop="remark" :itemData="formData">
                            <wl-input setW="460" slot="input" class="wl-input-item" slot-scope="col" placeholder="输入备注" :rawData="col.columnData" field="remark"></wl-input>
                        </wl-form-item>
                    </div>
                </template>
            </wl-form-inner>
            <wl-form-inner subTitle="部门成员信息">
                <template slot="inner_btn">
                    <div  class="div-new">
                        <wl-tip-button icon="btn_xz1" btnType="" :isSmall="true" tips="新增"  @click="doNew"></wl-tip-button>
                    </div>
                    <div class="div-new">
                        <wl-tip-button icon="btn_mmcz" btnType="" :isSmall="true" tips="清空"  @click="doReSet"></wl-tip-button>
                    </div>
                </template>
                <template slot="inner_body">
                    <el-table  slot="table" :row-class-name="rowClassName" :data="formData.mem_list" style="width: 100%"  max-height="350" border stripe >
                        <el-table-column label="操作" width="120" class-name="operation_cell">
                            <template slot-scope="scope">
                                <wl-tip-button icon="btn_sc" :isDel="true" tips="成员删除" @click="rowDelete(scope.$index, scope.row)"></wl-tip-button>
                            </template>
                        </el-table-column>
                        <el-table-column prop="id" label="编号"></el-table-column>
                        <el-table-column prop="name" label="账号"></el-table-column>
                        <el-table-column prop="dept_list" label="部门">
                            <template slot-scope="scope">
                            <wl-column field="name" :rawData="scope.row.dept_list"></wl-column>
                            </template>
                        </el-table-column>
                    </el-table>
                </template>
            </wl-form-inner>
          </el-form>
        </template>
    </wl-panel>
</template>
<script lang="ts" src="./org_panel.ts"></script>
<style scoped>
.div-new {
  width: 22px;
  height: 22px;
  padding-right: 2px;
  margin-left: 10px;
}
.div-new .svg-icon {
  vertical-align: -0.1em;
}
</style>
